<template>
	<view :style="{'padding-top':statusBarHeight + 'px'}">
		<view class="wrap">
			<image @click="TanPreviewImage('../../static/image/searchOrder.jpg')" class="orderImg" src="../../static/image/searchOrder.jpg"></image>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		data() {
			return {
				statusBarHeight: 0,
				safeAreaInsets: 0,
			};
		},
		methods: {
			...mapGetters(['getstatusBarHeight', 'getSaInsetBottom']),
			gonavigate() {
				uni.navigateTo({
					url: '/pages/searchDetail/index'
				})
			},
			TanPreviewImage(imageUrl) {
				var images = [];
				images.push(imageUrl);
				uni.previewImage({ // 预览图片  图片路径必须是一个数组 => ["http://192.168.100.251:8970/6_1597822634094.png"]
					current: 0,
					urls: images,
					longPressActions: { //长按保存图片到相册
						itemList: ['保存图片'],
						success: (data) => {
							console.log(data);
							uni.saveImageToPhotosAlbum({ //保存图片到相册
								filePath: payUrl,
								success: function() {
									uni.showToast({
										icon: 'success',
										title: '保存成功'
									})
								},
								fail: (err) => {
									uni.showToast({
										icon: 'none',
										title: '保存失败，请重新尝试'
									})
								}
							});
						},
						fail: (err) => {
							console.log(err.errMsg);
						}
					}
				});
			},
		},
		mounted() {
			this.statusBarHeight = this.getstatusBarHeight();
			this.safeAreaInsets = this.getSaInsetBottom();
		}
	};
</script>

<style scoped>
	page,body {
		background-color: #fff!important;
	}
	.orderImg {
		width: 100%;
		height: 1100rpx;
	}

	uni-page-body {
		background-color: #ffffff !important;
	}
</style>

<style>
	body {
		background-color: #fff!important;
	}
</style>